﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Face.aspx.cs" Inherits="Jy123.Web.Manage.User.Face" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link href="/css/custom/jquery.ui.css" rel="stylesheet" type="text/css" />
    <link href="../css/main.css" rel="stylesheet" type="text/css" />

    <script src="../js/jquery.js" type="text/javascript"></script>

    <script src="../js/jquery.ui.js" type="text/javascript"></script>

    <script src="../js/main.js" type="text/javascript"></script>

    <title>无标题页</title>
</head>
<body>
    <h4>
        <a href="#"><span>表情管理</span></a></h4>
    <form id="form1" runat="server">
    <div>
        <asp:GridView ID="GridView1" runat="server" AllowPaging="True" AllowSorting="True"
            AutoGenerateColumns="False" DataKeyNames="ID" DataSourceID="SqlDataSource1" CssClass="tblist">
            <Columns>
                <asp:BoundField DataField="ID" HeaderText="ID" InsertVisible="False" ReadOnly="True"
                    SortExpression="ID" Visible="False" />
                <asp:BoundField DataField="Title" HeaderText="名称" SortExpression="Title" />
                <asp:BoundField DataField="InCode" HeaderText="替代码" SortExpression="InCode" />
                <asp:BoundField DataField="Description" HeaderText="备注" SortExpression="Description" />
                <asp:BoundField DataField="FilePath" HeaderText="图片路径" SortExpression="FilePath" />
                <asp:CommandField HeaderText="操作" ShowDeleteButton="True" ShowEditButton="True" />
            </Columns>
        </asp:GridView>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
            DeleteCommand="DELETE FROM [User_Face] WHERE [ID] = @ID" InsertCommand="INSERT INTO [User_Face] ([InCode], [Title], [Description], [FilePath]) VALUES (@InCode, @Title, @Description, @FilePath)"
            SelectCommand="SELECT [ID], [InCode], [Title], [Description], [FilePath] FROM [User_Face]"
            UpdateCommand="UPDATE [User_Face] SET [InCode] = @InCode, [Title] = @Title, [Description] = @Description, [FilePath] = @FilePath WHERE [ID] = @ID">
            <DeleteParameters>
                <asp:Parameter Name="ID" Type="Int32" />
            </DeleteParameters>
            <UpdateParameters>
                <asp:Parameter Name="InCode" Type="String" />
                <asp:Parameter Name="Title" Type="String" />
                <asp:Parameter Name="Description" Type="String" />
                <asp:Parameter Name="FilePath" Type="String" />
                <asp:Parameter Name="ID" Type="Int32" />
            </UpdateParameters>
            <InsertParameters>
                <asp:Parameter Name="InCode" Type="String" />
                <asp:Parameter Name="Title" Type="String" />
                <asp:Parameter Name="Description" Type="String" />
                <asp:Parameter Name="FilePath" Type="String" />
            </InsertParameters>
        </asp:SqlDataSource>
        <div class="allform">
            <h5>
            </h5>
            <ul>
                <li class="b">增加表情：</li>
                <li>表情名：<asp:TextBox ID="txtTitle" runat="server" ValidationGroup="input" CssClass="text"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtTitle"
                        ErrorMessage="表情名不能为空"></asp:RequiredFieldValidator></li>
                <li>表情替代码<asp:TextBox ID="txtInCode" runat="server"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtInCode"
                        ErrorMessage="替代码不能为空"></asp:RequiredFieldValidator></li>
                <li>描述:<asp:TextBox ID="txtDescription" runat="server"></asp:TextBox></li>
                <li>图片路径:<asp:TextBox ID="txtFilePath" runat="server"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="txtFilePath"
                        ErrorMessage="路径不能为空"></asp:RequiredFieldValidator></li>
                <li>
                    <asp:Button ID="btnAddFace" runat="server" Text="确定" CssClass="button" OnClick="btnAddFace_Click" />
                </li>
            </ul>
        </div>
    </div>
    </form>
</body>
</html>
